package com.lanhao.aot.carrierintegration.bpost;

import java.io.File;

import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.fastjson.JSONObject;
import com.lanhao.aot.util.Dom4jUtil;

import cn.hutool.core.codec.Base64;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.UUID;
import cn.hutool.http.HttpRequest;

public class BPostUtil {
	private static final Logger LOG = LoggerFactory.getLogger(BPostUtil.class);
	public static final String URL = "https://api.landmarkglobal.com/v2/Ship.php";
	public static final String RQ_PARAMNAME = "RQXML";
	public static final String LABEL_ENCODING = "BASE64";
	public static final String FILE_TYPE = "PDF";
	public static final String COUNTRY_CODE = "BE";
	public static final String DEFAULT_WEIGHT = "0.25";

	public static final String ENV = "PRO";

	// 测试环境
	public static final String USERNAME_DEV = "bpostacademyapi";
	public static final String PASSWORD_DEV = "L@ndmarkAPI1234";
	public static final String CLIENT_ID_DEV = "651";
	public static final String SERVICE_CODE_DEV = "LGBEBP24P";
	public static final String REGION_DEV = "Client EMC";
	// 正式环境
	public static final String USERNAME_PRO = "Espace_API";
	public static final String PASSWORD_PRO = "AKFwws9E^2";
	public static final String CLIENT_ID_PRO = "1809";
	public static final String SERVICE_CODE_PRO = "LGBEBPER2";
	public static final String REGION_PRO = "Client EU Domestic";

	// 测试环境
	public static String USERNAME = USERNAME_DEV;
	public static String PASSWORD = PASSWORD_DEV;
	public static String CLIENT_ID = CLIENT_ID_DEV;
	public static String SERVICE_CODE = SERVICE_CODE_DEV;
	public static String REGION = REGION_DEV;

	static {
		if ("PRO".equals(ENV)) {
			USERNAME = USERNAME_PRO;
			PASSWORD = PASSWORD_PRO;
			CLIENT_ID = CLIENT_ID_PRO;
			SERVICE_CODE = SERVICE_CODE_PRO;
			REGION = REGION_PRO;
		}
	}

	public static String genReqParam() {
		StringBuilder sb = new StringBuilder();
		sb.append("<ShipRequest>");
		sb.append("<Login>");
		sb.append("<Username>" + USERNAME + "</Username>");
		sb.append("<Password>" + PASSWORD + "</Password>");
		sb.append("</Login>");

		sb.append("<Test>fales</Test>");
		sb.append("<ClientID>" + CLIENT_ID + "</ClientID>");
		sb.append("<Reference>" + UUID.fastUUID().toString(true) + "</Reference>");

		sb.append("<ShipTo>");
		sb.append("<Name>Test name</Name>");
		sb.append("<Address1>5130 Halford Drive Building #C Unit 1</Address1>");
//			sb.append("<Address2>Building #C</Address2>");
//			sb.append("<Address3>Unit 1</Address3>");
		sb.append("<City>Brussels</City>");
		sb.append("<State></State>");
		sb.append("<PostalCode>1000</PostalCode>");
		sb.append("<Country>" + COUNTRY_CODE + "</Country>");
		sb.append("<Phone>1-519-737-9101</Phone>");
//			sb.append("<Email>orders@test.com</Email>");
		sb.append("<Region>" + REGION + "</Region>");
		sb.append("<Residential>true</Residential>");
		sb.append("</ShipTo>");

//			sb.append("<ReturnInformation>");
//			sb.append("<OutboundShipment>");
//			sb.append("<Reference>12932</Reference>");
//			sb.append("<TrackingNumber>LTN123212</TrackingNumber>");
//			sb.append("</OutboundShipment>");
//			sb.append("<Condition>Damaged</Condition>");
//			sb.append("<RMANumber>RMA12321</RMANumber>");
//			sb.append("<Notes>The shipment was damaged in transit.</Notes>");
//			sb.append("</ReturnInformation>");

		sb.append("<ShipMethod>" + SERVICE_CODE + "</ShipMethod>");
		sb.append("<ShipmentInsuranceFreight>1</ShipmentInsuranceFreight>");
		sb.append("<ItemsCurrency>USD</ItemsCurrency>");
		sb.append("<LabelFormat>" + FILE_TYPE + "</LabelFormat>");
		sb.append("<LabelEncoding>" + LABEL_ENCODING + "</LabelEncoding>"); // LINKS

//			sb.append("<ShipOptions>");
//			sb.append("<Option>");
//			sb.append("<Name>dummy_option</Name>");
//			sb.append("<Value>true</Value>");
//			sb.append("</Option>");
//			sb.append("</ShipOptions>");

//			sb.append("<VendorInformation>");
//			sb.append("<VendorName>Test Company Legal Name</VendorName>");
//			sb.append("<VendorAddress1>5130 Halford Drive</VendorAddress1>");
//			sb.append("<VendorAddress2>Building #C</VendorAddress2>");
//			sb.append("<VendorCity>Brussels</VendorCity>");
//			sb.append("<VendorState></VendorState>");
//			sb.append("<VendorPostalCode>1000</VendorPostalCode>");
//			sb.append("<VendorCountry>BE</VendorCountry>");
//			sb.append("</VendorInformation>");

//			sb.append("<AdditionalFields>");
//			sb.append("<Field1>Any type of data</Field1>");
//			sb.append("<Field2>Purchased with Credit Card</Field2>");
//			sb.append("<Field3>99000029327172321</Field3>");
//			sb.append("<Field4>123198012</Field4>");
//			sb.append("<Field5>Stored information</Field5>");
//			sb.append("</AdditionalFields>");

		sb.append("<Packages>");
		sb.append("<Package>");
		sb.append("<WeightUnit>KG</WeightUnit> ");
		sb.append("<Weight>" + DEFAULT_WEIGHT + "</Weight>");
		sb.append("<DimensionsUnit>IN</DimensionsUnit>");
//			sb.append("<Height>12</Height>");
//			sb.append("<PackageReference>98233312</PackageReference>");
		sb.append("</Package>");
		sb.append("</Packages>");

//			sb.append("<Items>");
//			sb.append("<Item>");
//			sb.append("<Sku>7224059</Sku>");
//			sb.append("<Quantity>1</Quantity>");
//			sb.append("<UnitPrice>0.00</UnitPrice>");
//			sb.append("<Description>Espace Goods</Description>");
//			sb.append("<HSCode>640399.30.00</HSCode>");
//			sb.append("<CountryOfOrigin>CN</CountryOfOrigin>");
//			sb.append("</Item>");
//			sb.append("</Items>");
		sb.append("</ShipRequest>");
		return sb.toString();
	}

	public static void main(String[] args) {
		String genReqParam = genReqParam();
		LOG.info("开始请求获取标签，url={}，请求参数={}", URL, genReqParam);
		String respBody = HttpRequest.post(URL).form(RQ_PARAMNAME, genReqParam).execute().body();
		LOG.info("结束获取标签，respBody={}", respBody);
		FileUtil.writeString(respBody, new File("D:/lanmark.txt"), "UTF-8");
//		String respBody = "<?xml version=\"1.0\"?><ShipResponse><Result><Success>true</Success><ResultMessage>Shipment f80d2ece2e414e26bc4fd746f08039d9 successfully created and processed</ResultMessage><ShippingCarrier>Bpack</ShippingCarrier><Packages><Package><LabelImages><LabelImage>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8IC9UeXBlIC9DYXRhbG9nIC9WZXJzaW9uIC8xLjcgL1BhZ2VzIDEgMCBSIC9OYW1lcyA8PCA+PiAvVmlld2VyUHJlZmVyZW5jZXMgPDwgL0RpcmVjdGlvbiAvTDJSID4+IC9QYWdlTGF5b3V0IC9TaW5nbGVQYWdlIC9QYWdlTW9kZSAvVXNlTm9uZSAvT3BlbkFjdGlvbiBbNiAwIFIgL0ZpdEggbnVsbF0gL01ldGFkYXRhIDEyIDAgUiA+PgplbmRvYmoKeHJlZgowIDE0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMTQxMyAwMDAwMCBuIAowMDAwMDAzMzk5IDAwMDAwIG4gCjAwMDAwMDE0NzIgMDAwMDAgbiAKMDAwMDAwMTU3OCAwMDAwMCBuIAowMDAwMDAzNTM0IDAwMDAwIG4gCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMDQ4MyAwMDAwMCBuIAowMDAwMDAxNjg5IDAwMDAwIG4gCjAwMDAwMDI0NjEgMDAwMDAgbiAKMDAwMDAwMjU4OSAwMDAwMCBuIAowMDAwMDAzNzUwIDAwMDAwIG4gCjAwMDAwMDM5NDggMDAwMDAgbiAKMDAwMDAwODY3MSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDE0IC9Sb290IDEzIDAgUiAvSW5mbyAxMSAwIFIgL0lEIFsgPDM2MGM2MzQ4ZWEyMzA5NWVjNjRlNTVmY2VjNTllYTIwPiA8MzYwYzYzNDhlYTIzMDk1ZWM2NGU1NWZjZWM1OWVhMjA+IF0gPj4Kc3RhcnR4cmVmCjg4ODAKJSVFT0YK</LabelImage></LabelImages><TrackingNumber>323211925700001671510030</TrackingNumber><LandmarkTrackingNumber>LTN196894476N1</LandmarkTrackingNumber><PackageID>198321075</PackageID><BarcodeData>323211925700001671510030</BarcodeData></Package></Packages></Result></ShipResponse>";
		try {
			Document doc = DocumentHelper.parseText(respBody);
			JSONObject respObject = new JSONObject();
			Dom4jUtil.dom4j2Json(doc.getRootElement(), respObject);
			LOG.info("结束获取标签，respBody={}", respObject.toJSONString());
			JSONObject resultObject = respObject.getJSONObject("Result");
			Boolean success = resultObject.getBoolean("Success");
			if (success) {
				JSONObject packagesObject = resultObject.getJSONObject("Packages");
				JSONObject packageObject = packagesObject.getJSONObject("Package");
				String landmarkTrackingNumber = packageObject.getString("LandmarkTrackingNumber");
				String trackingNumber = packageObject.getString("TrackingNumber");
				String barcodeData = packageObject.getString("BarcodeData");
				LOG.info("获取标签成功，landmarkTrackingNumber={}，trackingNumber={}，barcodeData={}", landmarkTrackingNumber,
						trackingNumber, barcodeData);
				if ("LINKS".equals(LABEL_ENCODING)) {
					String labelLink = packageObject.getString("LabelLink");
					LOG.info("标签文件远程地址labelLink={}", labelLink);
				} else if ("BASE64".equals(LABEL_ENCODING)) {
					JSONObject labelImagesObject = packageObject.getJSONObject("LabelImages");
					String labelImage = labelImagesObject.getString("LabelImage");
					File file = new File("D:/" + trackingNumber + ".pdf");
					Base64.decodeToFile(labelImage, file);
					LOG.info("标签文件本地保存地址 localPath={}", file.getAbsoluteFile());
				} else {
					LOG.info("标签编码格式非法，此处跳过");
				}
			} else {
				JSONObject errorsObject = respObject.getJSONObject("Errors");
				JSONObject errorObject = errorsObject.getJSONObject("Error");
				String errorCode = errorObject.getString("ErrorCode");
				String errorMessage = errorObject.getString("ErrorMessage");
				LOG.info("获取标签失败了，errorCode={}, errorMessage={}", errorCode, errorMessage);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		// <?xml
		// version="1.0"?><ShipResponse><Result><Success>false</Success><ResultMessage>See
		// Errors element for error
		// details</ResultMessage></Result><Errors><Error><ErrorCode>broker_account_id</ErrorCode><ErrorMessage>This
		// shipment is traveling internationally, but is not configured to clear
		// customs. Change the delivery
		// program.</ErrorMessage></Error></Errors></ShipResponse>
		// <?xml
		// version="1.0"?><ShipResponse><Result><Success>true</Success><ResultMessage>Shipment
		// 0d7a439eaec44029aaa5f6237d729f59 successfully created and
		// processed</ResultMessage><ShippingCarrier>Bpack</ShippingCarrier><ShipmentLabelLink>https://api.landmarkglobal.com/download/get-label.php?hid=ZZXdjmyClvHjFKGTG%2BzwUSSqmSR5%2Fm537oHK_4ZzI0CD%2FT47dWHTm</ShipmentLabelLink><Packages><Package><LabelLink>https://api.landmarkglobal.com/download/get-label.php?hid=ulqJ0RzLs88KQDIDN8U76bjVai9qL23JtxmJAB41JUAwUVT3_%2FGr4vdZvoQ8SNKQs</LabelLink><TrackingNumber>323211925700001671503030</TrackingNumber><LandmarkTrackingNumber>LTN196893539N1</LandmarkTrackingNumber><PackageID>198320141</PackageID><BarcodeData>323211925700001671503030</BarcodeData><PackageReference>98233312</PackageReference></Package></Packages></Result></ShipResponse>
		// <?xml
		// version="1.0"?><ShipResponse><Result><Success>true</Success><ResultMessage>Shipment
		// f80d2ece2e414e26bc4fd746f08039d9 successfully created and
		// processed</ResultMessage><ShippingCarrier>Bpack</ShippingCarrier><Packages><Package><LabelImages><LabelImage>JVBERi0xLjcKJeLjz9MKNiAwIG9iago8PCAvVHlwZSAvUGFnZSAvUGFyZW50IDEgMCBSIC9MYXN0TW9kaWZpZWQgKEQ6MjAyMjA1MDYwMjM2MTktMDUnMDAnKSAvUmVzb3VyY2VzIDIgMCBSIC9NZWRpYUJveCBbMC4wMDAwMDAgMC4wMDAwMDAgMjg4LjAwMDAwMCA0MzIuMDAwMDAwXSAvQ3JvcEJveCBbMC4wMDAwMDAgMC4wMDAwMDAgMjg4LjAwMDAwMCA0MzIuMDAwMDAwXSAvQmxlZWRCb3ggWzAuMDAwMDAwIDAuMDAwMDAwIDI4OC4wMDAwMDAgNDMyLjAwMDAwMF0gL1RyaW1Cb3ggWzAuMDAwMDAwIDAuMDAwMDAwIDI4OC4wMDAwMDAgNDMyLjAwMDAwMF0gL0FydEJveCBbMC4wMDAwMDAgMC4wMDAwMDAgMjg4LjAwMDAwMCA0MzIuMDAwMDAwXSAvQ29udGVudHMgNyAwIFIgL1JvdGF0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G4gCjAwMDAwMDI0NjEgMDAwMDAgbiAKMDAwMDAwMjU4OSAwMDAwMCBuIAowMDAwMDAzNzUwIDAwMDAwIG4gCjAwMDAwMDM5NDggMDAwMDAgbiAKMDAwMDAwODY3MSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDE0IC9Sb290IDEzIDAgUiAvSW5mbyAxMSAwIFIgL0lEIFsgPDM2MGM2MzQ4ZWEyMzA5NWVjNjRlNTVmY2VjNTllYTIwPiA8MzYwYzYzNDhlYTIzMDk1ZWM2NGU1NWZjZWM1OWVhMjA+IF0gPj4Kc3RhcnR4cmVmCjg4ODAKJSVFT0YK</LabelImage></LabelImages><TrackingNumber>323211925700001671510030</TrackingNumber><LandmarkTrackingNumber>LTN196894476N1</LandmarkTrackingNumber><PackageID>198321075</PackageID><BarcodeData>323211925700001671510030</BarcodeData></Package></Packages></Result></ShipResponse>
	}
}
